<?php
//include('../phpcommon/setting.php');
// include('../phpcommon/db_mysql.php');
include('../phpcommon/secure.php');

// $db=new ps_DB;
$vars = $_REQUEST;
$mapd = $vars['m'];
DeHack($mapd,"");
$mapdata ="";
$pic = "";
$fpic ="";
$ypic ="";
$loadevent = "";
// $q = 
// "select * from maps where map_id='$mapd'";

// $db->query($q);

if ($mapd == '01'){
	$mapdata = "00000000000000000000000000000000|00000000000000000000000000000000|00000000110000000000000000000000|00000011110000000000000000000000|00000011111111000000000000000000|00000011111111000000000000000000|00000001111133110000000000001100|00000000011133111110000111111000|00000000011111111111111111110000|00000000011111111111111111100000|00000000011111111111111111000000|00000000001111111111110000000000|00000000001111111111000000001100|00000000001111111113300000011100|00000001133111111333111111111100|00000001111133303111111111111000|00000011111110000111111111110000|00000111101100000011111111111000|00000113333000111111111111100000|00000110000001111001111110000000|00000000000011100111111000000000|00000000000111000111001110000000|00000000000111111000000000000000|00000000000111110000000000000000|F7,14,1|8,14,1|7,15,1|23,21,2|22,21,2|22,20,2|22,19,2|23,19,2|24,19,2|24,18,2|25,18,2|26,18,2|26,17,2|27,17,2|28,17,2|27,16,2|21,19,2|21,20,2|20,19,2|20,20,2|19,20,2|19,21,2|18,21,2|17,21,2|16,22,2|15,23,2|18,20,2|17,20,2|25,17,2|23,18,2|19,19,2|22,18,2|24,17,2|26,16,2|28,15,2|24,21,3|";
	$pic = "7-1.jpg";
	$fpic ="7-1be.png";
	$ypic ="7-1y.png";
	$loadevent = "bgAudio[0] = new audio();
	bgAudio[0].src = '/RPG/sucai/river.mp3';
	bgAudio[0].maxvalue = 1;
	bgAudio[0].x = 28;bgAudio[0].y = 30;
	bgAudio[0].init();
	heshui = new actionBase();
	heshui.randerlayer =LAYER_BG_0;
	heshui.animimgs[0] = null;
	heshui.animimgs[1] = new Image();
	heshui.animimgs[1].src ='/RPG/sucai/7-2.png';
	heshui.animimgs[2] = new Image();
	heshui.animimgs[2].src ='/RPG/sucai/7-3.png';
	heshui.x = 800;
	heshui.y = 720;
	heshui.autoreplay = true;
	heshui.stepcnt =3;
	heshui.intval =3;
	
	Addaction(null,heshui);
	PreLoadlst.push(heshui.animimgs[1]);
	PreLoadlst.push(heshui.animimgs[2]);
";
}


if ($mapd == '02'){
	$mapdata = "11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|11111111111111111111111111111111|F";
	$pic = "205-1.png";
	$fpic =NULL;
	$ypic = NULL;
	$loadevent = "";
}


// if ($db->next_record()){
	$varstr = "initMap('".$mapdata."');";
	$varstr .= "\r\n";
	$varstr .= "mappic[0] = new Image();mappic[0].src = '/RPG/sucai/".$pic."';\r";
	$varstr .= "PreLoadlst.push(mappic[0]);\r";
	if ($fpic){
		$varstr .= "mappic[1] = new Image();mappic[1].src = '/RPG/sucai/".$fpic."';\r";
		$varstr .= "PreLoadlst.push(mappic[1]);\r";
	}else {
		$varstr .= "mappic[1] = null;\r";
	}
	
	if ($ypic){
		$varstr .= "mappic[2] = new Image();mappic[2].src = '/RPG/sucai/".$ypic."';\r";
		$varstr .= "PreLoadlst.push(mappic[2]);\r";
	}else {
		$varstr .= "mappic[2] = null;\r";
	}
	
	$varstr .=$loadevent;
// }

echo $varstr;


?>

